package com.sdk.service.impl;

import com.sdk.bean.CodeInfo;
import com.sdk.config.InfluxdbConfig;
import com.sdk.dao.InfluxdbDemoDao;
import com.sdk.service.InfluxdbDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InfluxdbDemoServiceImpl implements InfluxdbDemoService {

    @Autowired
    private InfluxdbDemoDao influxdbDemoDao;

    @Autowired
    private InfluxdbConfig influxdbConfig;

    @Override
    public void saveMessage(List<CodeInfo> list) throws Exception{

        influxdbDemoDao.saveMessage(list);
    }

    @Override
    public List<CodeInfo> selectMessage() throws Exception{

       return influxdbDemoDao.selectMessage();
    }
}